import { useEffect, memo } from "react";
const B = memo(function B({ onClick }) {
  const handClick = () => {
    onClick && onClick();
  };

  useEffect(() => {
    // console.log("b组件挂载了!");
  }, []);

  console.log("b组件update!");

  return (
    <div className="content">
      <button onClick={handClick}>Click me</button>
    </div>
  );
});
export default B;
